package com.dc.designPattern._11_proxy.extend.extend3;

import lombok.AllArgsConstructor;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * Description: 动态代理_被代理的 Handler类 
 * @author: gdc
 * @date: 2021/6/25
 * @version 1.0
 */
@AllArgsConstructor
public class MyInvocationHandler implements InvocationHandler {

    /**
     * 目标对象
     */
    private Object target;

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        return method.invoke(this.target, args);
    }
}
